﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Models;
using Utilities;
using Telerik.Web.Mvc;

namespace Grant_Warehouse.Controllers
{ 
    public class StockController : Controller
    {
        public ViewResult Index()
        {
            return View();
        }

        [GridAction]
        public ActionResult AjaxStockIndex()
        {
            return View(CT.GetViewModel<Stock, StockView>("Area", "Warehouse", "Category", "quality"));
        }

        public ViewResult Details(int id)
        {
            return View(CH.GetDataById<Stock>(id));
        }
    }
}